package 静态内部类复习;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2022-06-27
 * Time: 9:25
 */
class OuterClass{
    public int a =1;
    static class InnerClass{
        public OuterClass outerClass;

        public InnerClass(OuterClass outerClass) {
            this.outerClass = outerClass;
        }

        public void fun(){
            System.out.println(outerClass.a);
        }
    }
}
public class Test {
    OuterClass.InnerClass innerClass = new OuterClass.InnerClass(new OuterClass());
}
